/*
 * Copyright (C), 2002-2017, 苏宁易购电子商务有限公司
 * FileName: ActivitySaleDataDaoImpl.java
 * Author:   15060460
 * Date:     2017年3月29日 上午11:35:10
 * Description: //模块目的、功能描述      
 * History: //修改记录
 * <author>      <time>      <version>    <desc>
 * 修改人姓名             修改时间            版本号                  描述
 */
package com.suning.sawp.member.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.suning.sawp.member.dao.ActivityStatisDao;
import com.suning.sawp.member.vo.ActivityCateStatisVo;
import com.suning.sawp.member.vo.ActivityClientStatisVo;
import com.suning.sawp.member.vo.ActivityEmpStatisVo;
import com.suning.sawp.member.vo.ActivityStatisVo;

/**
 * 
 * 活动统计dao实现<br> 
 *
 * @author 14060886 祝翔龙
 */
@Repository
public class ActivityStatisDaoImpl extends BaseDaoImpl implements ActivityStatisDao{
    
    @Override
    public List<ActivityStatisVo> selectAllActivityStatisByStore(String storeCode, Integer start, Integer end) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("storeCode", storeCode);
        params.put("start", start);
        params.put("end", end);
        return dalClientRead.queryForList("activityStatis.selectAllActivityStatisByStore", params, ActivityStatisVo.class);
    }

    @Override
    public List<ActivityStatisVo> selectAllActivityStatisByCate(String storeCode, String cateCode, Integer start, Integer end) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("storeCode", storeCode);
        params.put("cateCode", cateCode);
        params.put("start", start);
        params.put("end", end);
        return dalClientRead.queryForList("activityStatis.selectAllActivityStatisByCate", params, ActivityStatisVo.class);
    }

    @Override
    public List<ActivityStatisVo> selectAllActivityStatisByEmp(String storeCode, String employeeId, Integer start, Integer end) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("storeCode", storeCode);
        params.put("employeeId", employeeId);
        params.put("start", start);
        params.put("end", end);
        return dalClientRead.queryForList("activityStatis.selectAllActivityStatisByEmp", params, ActivityStatisVo.class);
    }

    @Override
    public ActivityStatisVo selectActivityStatisByStore(String storeCode, String activityId, String source, String mode) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("storeCode", storeCode);
        params.put("activityId", activityId);
        params.put("source", source);
        params.put("mode", mode);
        return dalClientRead.queryForObject("activityStatis.selectActivityStatisByStore", params, ActivityStatisVo.class);
    }

    @Override
    public List<ActivityCateStatisVo> selectCateStatisByStore(String storeCode, String activityId, String source, String mode) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("storeCode", storeCode);
        params.put("activityId", activityId);
        params.put("source", source);
        params.put("mode", mode);
        return dalClientRead.queryForList("activityStatis.selectCateStatisByStore", params, ActivityCateStatisVo.class);
    }

    @Override
    public ActivityCateStatisVo selectActivityStatisByCate(String storeCode, String activityId, String cateCode,
            String source, String mode) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("storeCode", storeCode);
        params.put("activityId", activityId);
        params.put("cateCode", cateCode);
        params.put("source", source);
        params.put("mode", mode);
        return dalClientRead.queryForObject("activityStatis.selectActivityStatisByCate", params, ActivityCateStatisVo.class);
    }

    @Override
    public List<ActivityEmpStatisVo> selectEmpStatisByCate(String storeCode, String activityId, String cateCode,
            String source, String mode) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("storeCode", storeCode);
        params.put("activityId", activityId);
        params.put("cateCode", cateCode);
        params.put("source", source);
        params.put("mode", mode);
        return dalClientRead.queryForList("activityStatis.selectEmpStatisByCate", params, ActivityEmpStatisVo.class);
    }

    @Override
    public ActivityStatisVo selectActivityStatisByEmp(String storeCode, String activityId, String cateCode, String employeeId,
            String source, String mode) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("storeCode", storeCode);
        params.put("activityId", activityId);
        params.put("cateCode", cateCode);
        params.put("employeeId", employeeId);
        params.put("source", source);
        params.put("mode", mode);
        return dalClientRead.queryForObject("activityStatis.selectActivityStatisByEmp", params, ActivityStatisVo.class);
    }

    @Override
    public List<ActivityClientStatisVo> selectClientStatisByEmp(String storeCode, String activityId, String cateCode, String employeeId,
            String source, String mode, Integer start, Integer end) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("storeCode", storeCode);
        params.put("activityId", activityId);
        params.put("cateCode", cateCode);
        params.put("employeeId", employeeId);
        params.put("source", source);
        params.put("mode", mode);
        params.put("start", start);
        params.put("end", end);
        return dalClientRead.queryForList("activityStatis.selectClientStatisByEmp", params, ActivityClientStatisVo.class);
    }

    
}
